package com.wc.alorithm_luogu.P5735;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/4/24 10:33
 * @description https://www.luogu.com.cn/problem/P5735
 * 距离函数
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        double L = 0;
        double x1 = sc.nextDouble();
        double y1 = sc.nextDouble();
        double x2 = sc.nextDouble();
        double y2 = sc.nextDouble();
        double x3 = sc.nextDouble();
        double y3 = sc.nextDouble();
        L = distant(x1,y1,x2,y2) + distant(x1,y1,x3,y3) + distant(x2,y2,x3,y3);
        System.out.printf("%.2f",L);
    }

    public static double distant(double x1, double y1, double x2, double y2) {
        return Math.pow(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2), 0.5);
    }
}
